/**
 * Created by Noir on 12/31/13.
 */

module.exports = function(app,sio){
    var notification =
        sio.of('/notification').on('connection',function(socket){
            console.log('Start');
            socket.emit('message',{message:'welcome'});
            socket.on('hello',function(data){
                console.log('Client said to Server: ' + data.message);
            });
            socket.on('helloAll', function(data){
                socket.broadcast.emit('message',{message: 'Client A just say that: ' + data.message + ' at '+  Date.now()});
            });
    });

    app.get('/notification',function(req,res){
       return res.render('notification/viewNotification',{title:'View Notification'});
    });
}
